package com.xmx.config;

import com.xmx.interceptors.CheckloginStatusInteceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * overview：
 * author:
 * 2023年05月04日 13:04:
 */
@Configuration
public class SpringMvcConfig extends WebMvcConfigurationSupport {
    @Autowired
    private CheckloginStatusInteceptor checkloginStatusInteceptor;

////    视图解析器
//    @Bean
//    public InternalResourceViewResolver jspView(){
//        InternalResourceViewResolver resolver = new InternalResourceViewResolver();
//        resolver.setPrefix("/WEB-IF/page/");
//        resolver.setSuffix(".jsp");
//        return resolver;
//    }

//    //属性文件解析器
//    @Bean
//    public static PropertySourcesPlaceholderConfigurer propertyConfigurer(){
//        return new PropertySourcesPlaceholderConfigurer();
//    }

    //注册拦截器

//    @Override
//    protected void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(checkloginStatusInteceptor).addPathPatterns("/**");
//    }
}
